package appapi.dao;

import appapi.Request.OrganizaPageReq;
import appapi.Request.bigscreen.SelfEquipUseReq;
import appapi.Vo.AppVo.GetOrgListVo;
import appapi.dto.bigScreenDto.OrgaPathModel;
import appapi.dto.bigScreenDto.ProjOrgaPathModel;
import appapi.entity.Zhongjiao.OrganizationDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author djq
 * @date 2023/5/23 10:48
 * @description:
 */

@Mapper
public interface OrganizationMapper {
    int deleteByPrimaryKey(Long orgaId);

    int insert(OrganizationDto record);

    int insertSelective(OrganizationDto record);

    OrganizationDto selectByPrimaryKey(Long orgaId);

    int updateByPrimaryKeySelective(OrganizationDto record);

    int updateByPrimaryKey(OrganizationDto record);

    List<Map<String, Object>> selectOrgList(OrganizaPageReq dto);

    List<GetOrgListVo> selectOrgListByPath(OrganizaPageReq dto);

    Map<String, Object> selectOrgDetail(Long orgaId);

    List<Map<String, Object>> selectOrgTree(@Param("orgaPid") Long orgaPid,@Param("orgaId") Long orgaId);
    List<Map<String, Object>> selectOrgListByArea(@Param("areaId") Integer areaId);

    List<OrgaPathModel>selectOrgListByAreaModel(@Param("areaId") Integer areaId,@Param("orgaId") Long orgaId);

    List<ProjOrgaPathModel>selectProjListByAreaModel(@Param("areaId") Integer areaId,@Param("orgaId") Long orgaId);

    List<Map<String, Object>> selectOrgProjListByArea(@Param("areaId") Integer areaId);
}